package top.jsjkxyjs.blackbox.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.jsjkxyjs.blackbox.entity.Devbind;
import top.jsjkxyjs.blackbox.entity.Exclude;
import top.jsjkxyjs.blackbox.mapper.ExcludeMapper;
import top.jsjkxyjs.blackbox.service.DevBindService;
import top.jsjkxyjs.blackbox.service.ExcludeService;

@Service
public class ExcludeServiceImpl implements ExcludeService {
	@Autowired
	ExcludeMapper excludeMapper;
	@Autowired
	DevBindService devBindService;

	@Override
	public boolean checkEventFeasible(Devbind devbind, long at) {
		return excludeMapper.checkEventFeasible(devbind.getUserId(), at) > 0;
	}

	@Override
	public boolean insertExclude(Exclude exclude) {
		return excludeMapper.insertExclude(exclude) > 0;
	}

	@Override
	public Exclude getExcludeByEvent(int eventId) {
		return excludeMapper.getExcludeByEvent(eventId);
	}
}
